cmake_minimum_required(VERSION 3.15)

project(test_target_c_cxx_flags C CXX)

add_executable(main sub.c main.cc)

target_compile_options(main PRIVATE
    $<$<COMPILE_LANGUAGE:C>:-Wall;-Wextra>
)
target_compile_options(main PRIVATE
    $<$<COMPILE_LANGUAGE:CXX>:-faligned-new>
)
